<?php
try {
    error_reporting(0);
    header('Content-Type: text/html; charset=utf-8');
    $ACC_ID = $_GET['ACC_ID'];
    $BRANCH = $_GET['BRANCH'];

    //$url = "http://172.16.195.26/ArcGIS/rest/services/mwajavascript/MapServer/45/query?text=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&where=BRANCH=$BRANCH+and+ACC='$ACC_ID'&returnGeometry=true&outSR=&outFields=ACC%2CBRANCH&f=pjson";
    $url = "http://172.16.195.26/arcgis/rest/services/wmsservice/MapServer/13/query?where=ACC='$ACC_ID'+and+BRANCH='$BRANCH'&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=ACC%2CBRANCH&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson";
    $json = file_get_contents( $url ); 
    echo $json;	
	
} catch (Exception $e) {
    echo ("Error" . " " . $e);
}
?>